import Mock from 'mockjs';

Mock.mock('/museum-role/area/getAllArea', 'get', {
  code: 200,
  message: '获取地域信息',
  data: {
    areaList: [
      {
        areaId: 12,
        parentId: 0,
        areaNumber: 2,
        areaName: '大同市',
        orderNum: null,
        leader: 'string',
        phone: 'string',
        email: 'string',
        children: [
          {
            areaId: 18,
            parentId: 12,
            areaNumber: 113,
            areaName: '大同县',
            orderNum: null,
            leader: 'string',
            phone: 'string',
            email: 'string',
            children: [],
            createTime: '2020-12-20 15:59:19',
            deptDesc: null
          },
          {
            areaId: 201,
            parentId: 12,
            areaNumber: 1009,
            areaName: '羊羔县',
            orderNum: null,
            leader: 'string',
            phone: 'string',
            email: 'string',
            children: [],
            createTime: '2020-12-28 11:08:37',
            deptDesc: null
          }
        ],
        createTime: '2020-12-20 11:35:34',
        deptDesc: null
      },
      {
        areaId: 200,
        parentId: 0,
        areaNumber: 1133,
        areaName: '默认角色地区',
        orderNum: null,
        leader: null,
        phone: null,
        email: null,
        children: [],
        createTime: null,
        deptDesc: null
      },
      {
        areaId: 203,
        parentId: 0,
        areaNumber: 0,
        areaName: 'string',
        orderNum: null,
        leader: 'string',
        phone: 'string',
        email: 'string',
        children: [],
        createTime: '2021-01-04 10:47:53',
        deptDesc: null
      }
    ]
  }
});

Mock.mock('/museum-role/area/addArea', 'post', {
  code: 200,
  message: '添加地域成功',
  data: null
});

Mock.mock(RegExp('/museum-role/area/deleteArea' + '.*'), 'delete', {
  code: 200,
  message: '删除地域成功',
  data: null
});

Mock.mock('/museum-role/area/updateArea', 'put', {
  code: 200,
  message: '修改地域成功',
  data: null
});
